namespace FIREFLYX {
    export type ComponentUseSign = "none" | "light" | "renderer" | "camera";
    /** 组件基本类 */
    export abstract class Component implements IDispose, IInstanceID {
        protected static _useSign: ComponentUseSign = "none";
        /** 使用标记 */
        public static get useSign() { return this._useSign; }
        /** 实例ID 记数*/
        private static _instanceIDCount: number = 0;

        public get isDisposed() { return this._isDisposed; }
        /** 依附的场景节点对象 */
        public entity: Nullable<GameObject>;
        //实例ID
        private readonly _instanceID: number;
        //是否被销毁
        private _isDisposed: boolean = false;

        constructor() {
            this._instanceID = Component._instanceIDCount++;
        }
        //fucntion
        public dispose(): void {
            this.entity = null;
            this._isDisposed = true;
        }

        public getInstanceID(): number { return this._instanceID; }
    }
}